//
//  LimitCell.m
//  IFreeAppDemo
//
//  Created by qianfeng on 15/11/5.
//  Copyright © 2015年 qianfeng. All rights reserved.
//

#import "LimitCell.h"
#import "UIImageView+AFNetworking.h"

@implementation LimitCell
{
    __weak IBOutlet UIImageView *mImageView;
    __weak IBOutlet UILabel *mName;
    __weak IBOutlet UILabel *time;
    __weak IBOutlet UILabel *price;
    __weak IBOutlet UILabel *type;
    __weak IBOutlet UILabel *share;
    __weak IBOutlet UILabel *collect;
    __weak IBOutlet UILabel *download;
    
}

- (void)awakeFromNib
{
    mImageView.layer.cornerRadius = 5.0;
    mImageView.clipsToBounds = YES;
}

- (void)setModel:(LimitFreeModel *)model
{
    _model = model;
    
    [mImageView setImageWithURL:[NSURL URLWithString:_model.iconUrl]];
    mName.text = model.name;
    time.text = model.expireDatetime;
    price.text = model.currentPrice;
    type.text = model.categoryName;
//    share.text = model.
    download.text = model.downloads;
    collect.text = model.favorites;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
